import requests
import time 

def download(a):
   
    url = 'https://www.a.com/card/0/'+a+'.jpg'
    name = a+'.jpg'
    path = './P/'
    full_path=path + name
    r = requests.get(url)
    with open(full_path,'wb') as code:
        code.write(r.content)

    print (name+"下载完成")
    time.sleep(0.2)


a=3001
while a<3005:
    msg=a
    msg=str(a)
    download(msg)
    a=a+1

input()
